package top.xchch.creational.factory.simplefactory;

/**
 * 把 Pizza 类做成抽象类
 */
public abstract class BasePizza {
    private String name;

    /**
     * 准备原材料
     */
    public abstract void prepare();

    /**
     * 烘烤
     */
    public void bake() {
        System.out.println(name + " baking;");
    }

    /**
     * 切分
     */
    public void cut() {
        System.out.println(name + " cutting;");
    }

    /**
     * 打包
     */
    public void box() {
        System.out.println(name + " boxing;");
    }

    public void setName(String name) {
        this.name = name;
    }
}
